package travlefate.story.activity;

import android.support.v7.widget.LinearLayoutManager;

import travlefate.story.R;
import travlefate.story.adapter.StoryInfoAdapter;
import travlefate.story.base.BaseSwipeActivity;
import travlefate.story.bean.ResultStory;
import travlefate.story.views.PullToRefreshRecycleView;

/**
 * @author keven
 * @data 15/12/23 上午10:34
 * @package travlefate.story.activity
 */

public class StoryInfoActivity extends BaseSwipeActivity {

    private PullToRefreshRecycleView mRecycleView;
    private StoryInfoAdapter mAdapter;
    private ResultStory story;

    @Override
    protected void initDatas() {
        story = (ResultStory) getIntent().getSerializableExtra("story");
        LinearLayoutManager manager = new LinearLayoutManager(this);
        mRecycleView.setLayoutManager(manager);
        mAdapter = new StoryInfoAdapter(this,story);
        mRecycleView.setAdapter(mAdapter);
    }

    @Override
    protected void initClick() {

    }

    @Override
    protected void initViews() {
        mRecycleView = (PullToRefreshRecycleView) findViewById(R.id.story_info_list);
    }

    @Override
    protected void initLayout() {
        setContentView(R.layout.activity_story_info);
    }
}
